package simple.cashflow.service.impl;

import java.util.List;

import org.hibernate.SessionFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import simple.cashflow.model.Kas;
import simple.cashflow.service.KasService;

@Service("kasService")
public class KasServiceImpl implements KasService {
	
	@Autowired
	private SessionFactory sessionFactory;
	private String hqlCariSemua= "from Kas";

	@Override
	public List<Kas> lihatSemuaKas() {
		return sessionFactory.getCurrentSession().createQuery(hqlCariSemua).list();
	}

}
